package controller

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"net/http"
	"netdisk/dto"
	"netdisk/service"
)

func Test(context *gin.Context) {
	fmt.Println("ghello")
}

func SendRegisterToken(context *gin.Context) {
	email := context.Query("email")
	service.SendEmailToRegister(email)
	context.JSON(http.StatusOK, gin.H{})
}

func RegisterUser(context *gin.Context) {
	d := new(dto.RegisterDTO)
	context.ShouldBind(d)
	service.AddUser(d)
	context.JSON(http.StatusOK, gin.H{})
}

func SetAvator(context *gin.Context) {
}
